package com.syas.model.models;

import com.syas.base.model.interfaces.ICUDEable;
import com.syas.base.model.models.Entity;

import java.sql.Timestamp;
import java.text.Format;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by weigong on 2015/11/28.
 */
public class FrmgerPfmce extends Entity<Integer> implements ICUDEable {

    // Fields

    /**
     * 客户姓名
     */
    private String customerNname;

    /**
     * 客户e租宝账户
     */
    private String customerCmerEzbo;

    /**
     * 总公司
     */
    private  String headOffice;

    /**
     * 分公司编号
     */
    private String branchNumber;

    /**
     * 所属区域
     */
     private String area;

    /**
     * 区域负责人
     */
    private String arealeader;

    /***
     * 所属分公司
     */
    private String subordinateBranch;

    /**
     * 分公司负责人
     */
    private String brchcomyleader;

    /**
     * 所属营业部
     */
    private String salesDepartment;

    /**
     *营业部负责人
     */
    private String saledeptleader;

    /**
     * 所属分部
     */
    private String subBranch;

    /**
     * 分部负责人
     */
    private String diviseleader;

    /**
     * 所属团队
     */
    private String  subTeam;

    /**
     * 团队负责人
     */
    private String teamleader;

    /**
     * 理财师姓名
     * Financial planner
     */
    private String financialPlannerName;

    /**
     * 理财师e租宝账户
     */
    private String financialPlannerCmerEzbo;

    /**
     * 投资产品
     */
    private String investpdt;

    /**
     * 投资金额
     */
    private Double investamt;

    /**
     * 绩效业绩
     */
    private Double achieve;


    /**
     * 投资时间
     */
    private Timestamp investtime;


    /**
     * 投资方式
     */
    private String investway;

    /**
     * 有效天数
     */
    private String effeday;

    /**
     * 赎回时间
     */
    private Timestamp redetime;


    /**
     * 投资ID
     */
    private String investid;



    public FrmgerPfmce() {
    }


    public FrmgerPfmce(String customerNname, String customerCmerEzbo, String headOffice, String branchNumber,
                       String area, String arealeader, String subordinateBranch, String brchcomyleader, String salesDepartment,
                       String saledeptleader, String subBranch, String diviseleader, String subTeam, String teamleader,
                       String financialPlannerName, String financialPlannerCmerEzbo, String investpdt, Double investamt,
                       Double achieve, Timestamp investtime, String investway, String effeday, Timestamp redetime,
                       String investid) {
        this.customerNname = customerNname;
        this.customerCmerEzbo = customerCmerEzbo;
        this.headOffice = headOffice;
        this.branchNumber = branchNumber;
        this.area = area;
        this.arealeader = arealeader;
        this.subordinateBranch = subordinateBranch;
        this.brchcomyleader = brchcomyleader;
        this.salesDepartment = salesDepartment;
        this.saledeptleader = saledeptleader;
        this.subBranch = subBranch;
        this.diviseleader = diviseleader;
        this.subTeam = subTeam;
        this.teamleader = teamleader;
        this.financialPlannerName = financialPlannerName;
        this.financialPlannerCmerEzbo = financialPlannerCmerEzbo;
        this.investpdt = investpdt;
        this.investamt = investamt;
        this.achieve = achieve;
        this.investtime = investtime;
        this.investway = investway;
        this.effeday = effeday;
        this.redetime = redetime;
        this.investid = investid;

    }

   /*
    //导Excel要用到的构造
    public FrmgerPfmce(Object customerNname, Object customerCmerEzbo, Object headOffice, Object branchNumber,
                       Object area, Object arealeader, Object subordinateBranch, Object brchcomyleader,
                       Object salesDepartment, Object saledeptleader, Object subBranch, Object diviseleader,
                       Object subTeam, Object teamleader, Object financialPlannerName, Object financialPlannerCmerEzbo,
                       Object investpdt, Object investamt, Object achieve, Object investtime, Object investway, Object effeday,
                       Object redetime, Object investid,Object fmger) {
        this.customerNname = (String)customerNname;
        this.customerCmerEzbo = (String)customerCmerEzbo;
        this.headOffice = (String)headOffice;
        this.branchNumber = (String)branchNumber;
        this.area = (String)area;
        this.arealeader = (String)arealeader;
        this.subordinateBranch = (String)subordinateBranch;
        this.brchcomyleader = (String)brchcomyleader;
        this.salesDepartment = (String)salesDepartment;
        this.saledeptleader = (String)saledeptleader;
        this.subBranch = (String)subBranch;
        this.diviseleader = (String)diviseleader;
        this.subTeam = (String)subTeam;
        this.teamleader = (String)teamleader;
        this.financialPlannerName = (String)financialPlannerName;
        this.financialPlannerCmerEzbo = (String)financialPlannerCmerEzbo;
        this.investpdt = (String)investpdt;
        this.investamt = (Double)investamt;
        this.achieve = (Double)achieve;
        String investtimeStr = (String)investtime;
        this.investtime = getTimestampToStr(investtimeStr);
        this.investway = (Integer)investway;
        this.effeday = (Integer)effeday;
        String redetimeStr = (String)redetime;
        this.redetime = getTimestampToStr(redetimeStr);
        this.investid = (String)investid;
        if(fmger != null) {
            this.fmger = (Fmger) fmger;
        }
    }
   */

    public String getCustomerNname() {
        return customerNname;
    }

    public void setCustomerNname(String customerNname) {
        this.customerNname = customerNname;
    }

    public String getCustomerCmerEzbo() {
        return customerCmerEzbo;
    }

    public void setCustomerCmerEzbo(String customerCmerEzbo) {
        this.customerCmerEzbo = customerCmerEzbo;
    }

    public String getHeadOffice() {
        return headOffice;
    }

    public void setHeadOffice(String headOffice) {
        this.headOffice = headOffice;
    }

    public String getBranchNumber() {
        return branchNumber;
    }

    public void setBranchNumber(String branchNumber) {
        this.branchNumber = branchNumber;
    }

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    public String getArealeader() {
        return arealeader;
    }

    public void setArealeader(String arealeader) {
        this.arealeader = arealeader;
    }

    public String getSubordinateBranch() {
        return subordinateBranch;
    }

    public void setSubordinateBranch(String subordinateBranch) {
        this.subordinateBranch = subordinateBranch;
    }

    public String getBrchcomyleader() {
        return brchcomyleader;
    }

    public void setBrchcomyleader(String brchcomyleader) {
        this.brchcomyleader = brchcomyleader;
    }

    public String getSalesDepartment() {
        return salesDepartment;
    }

    public void setSalesDepartment(String salesDepartment) {
        this.salesDepartment = salesDepartment;
    }

    public String getSaledeptleader() {
        return saledeptleader;
    }

    public void setSaledeptleader(String saledeptleader) {
        this.saledeptleader = saledeptleader;
    }

    public String getSubBranch() {
        return subBranch;
    }

    public void setSubBranch(String subBranch) {
        this.subBranch = subBranch;
    }

    public String getDiviseleader() {
        return diviseleader;
    }

    public void setDiviseleader(String diviseleader) {
        this.diviseleader = diviseleader;
    }

    public String getSubTeam() {
        return subTeam;
    }

    public void setSubTeam(String subTeam) {
        this.subTeam = subTeam;
    }

    public String getTeamleader() {
        return teamleader;
    }

    public void setTeamleader(String teamleader) {
        this.teamleader = teamleader;
    }

    public String getFinancialPlannerName() {
        return financialPlannerName;
    }

    public void setFinancialPlannerName(String financialPlannerName) {
        this.financialPlannerName = financialPlannerName;
    }

    public String getFinancialPlannerCmerEzbo() {
        return financialPlannerCmerEzbo;
    }

    public void setFinancialPlannerCmerEzbo(String financialPlannerCmerEzbo) {
        this.financialPlannerCmerEzbo = financialPlannerCmerEzbo;
    }

    public String getInvestpdt() {
        return investpdt;
    }

    public void setInvestpdt(String investpdt) {
        this.investpdt = investpdt;
    }

    public Double getInvestamt() {
        return investamt;
    }

    public void setInvestamt(Double investamt) {
        this.investamt = investamt;
    }

    public Double getAchieve() {
        return achieve;
    }

    public void setAchieve(Double achieve) {
        this.achieve = achieve;
    }

    public Timestamp getInvesttime() {
        return investtime;
    }

    public void setInvesttime(Timestamp investtime) {
        this.investtime = investtime;
    }

    public String getInvestway() {
        return investway;
    }

    public void setInvestway(String investway) {
        this.investway = investway;
    }

    public String getEffeday() {
        return effeday;
    }

    public void setEffeday(String effeday) {
        this.effeday = effeday;
    }

    public Timestamp getRedetime() {
        return redetime;
    }

    public void setRedetime(Timestamp redetime) {
        this.redetime = redetime;
    }

    public String getInvestid() {
        return investid;
    }

    public void setInvestid(String investid) {
        this.investid = investid;
    }




    //转换时间
    public Timestamp getTimestampToStr(String strData){
        Format f = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
        Timestamp ts = null;
        try {
            Date d = (Date) f.parseObject(strData);
            ts = new Timestamp(d.getTime());
        }catch (Exception e){
            e.printStackTrace();
        }
        return  ts;
    }
}
